import service from '@/utils/request'
// @Tags Comments
// @Summary 创建comments表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Comments true "创建comments表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /comments/createComments [post]
export const createComments = (data) => {
  return service({
    url: '/comments/createComments',
    method: 'post',
    data
  })
}

// @Tags Comments
// @Summary 删除comments表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Comments true "删除comments表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /comments/deleteComments [delete]
export const deleteComments = (params) => {
  return service({
    url: '/comments/deleteComments',
    method: 'delete',
    params
  })
}

// @Tags Comments
// @Summary 批量删除comments表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除comments表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /comments/deleteComments [delete]
export const deleteCommentsByIds = (params) => {
  return service({
    url: '/comments/deleteCommentsByIds',
    method: 'delete',
    params
  })
}

// @Tags Comments
// @Summary 更新comments表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Comments true "更新comments表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /comments/updateComments [put]
export const updateComments = (data) => {
  return service({
    url: '/comments/updateComments',
    method: 'put',
    data
  })
}

// @Tags Comments
// @Summary 用id查询comments表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Comments true "用id查询comments表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /comments/findComments [get]
export const findComments = (params) => {
  return service({
    url: '/comments/findComments',
    method: 'get',
    params
  })
}

// @Tags Comments
// @Summary 分页获取comments表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取comments表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /comments/getCommentsList [get]
export const getCommentsList = (params) => {
  return service({
    url: '/comments/getCommentsList',
    method: 'get',
    params
  })
}

// @Tags Comments
// @Summary 不需要鉴权的comments表接口
// @accept application/json
// @Produce application/json
// @Param data query commentReq.CommentsSearch true "分页获取comments表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /comments/getCommentsPublic [get]
export const getCommentsPublic = () => {
  return service({
    url: '/comments/getCommentsPublic',
    method: 'get',
  })
}
